import React from "react";
import { Button, Drawer } from "antd";
// import { useDispatch, useSelector } from "react-redux";
// import { projectListActions, selectProjectModalOpen } from "./slice";
import { useProjectModal } from "./util";

export const ProjectModal = () => {
  // const dispatch = useDispatch();
  // const modalOpen = useSelector(selectProjectModalOpen);
  const { modalOpen, close } = useProjectModal();

  return (
    <Drawer
      width={"100%"}
      visible={modalOpen}
      // onClose={() => dispatch(projectListActions.closeModal())}
      onClose={close}
    >
      <h1>Project Modal</h1>
      <Button
        // onClick={() => dispatch(projectListActions.closeModal())}
        onClick={close}
      >
        关闭
      </Button>
    </Drawer>
  );
};
